/**
* Copyright (C) 2013-2024 Nanjing Pengyun Network Technology Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*     http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/ 

package py.console.errorcode;

/**
 * Errors.
 */
public enum Errors {
  OK(0, "Success"),
  AccessDeniedExceptionThrift(1,
      "The current user does not have permission to access the resource"),
  AccessRuleNotAppliedThrift(2, "Access rule is not applied to volume"),
  AccessRuleNotFoundThrift(3, "Access rule is not found"),
  AccessRuleUnderOperationThrift(4, "Access rule is being operated"),
  AccountAlreadyExistsExceptionThrift(5, "Account already exists"),
  AccountNotFoundExceptionThrift(6, "Account not found"),
  AlarmStoreException(7, "Alarm store failed"),
  AlarmTaskCreationException(8, "Alarm task is creation"),
  AlarmTaskStartingException(9, "Alarm task is starting"),
  AlarmTaskStoppingException(10, "Alarm task is stopping"),
  AlreadyExistStaticLimitationExceptionThrift(11, "Static limitation is already exised"),
  ApplyFailedDueToConflictExceptionThrift(12, "Apply failed, due to conflict"),
  ApplyFailedDueToVolumeIsReadOnlyExceptionThrift(13, "Apply failed due to volume is read only"),
  ArchiveIsUsingExceptionThrift(14, "Archive is using"),
  ArchiveManagerNotSupportExceptionThrift(15, "Archive manager not support"),
  ArchiveNotFoundExceptionThrift(16, "Archive not found"),
  ArchiveNotFreeToUseExceptionThrift(17, "Archive not free to use"),
  ArchiveTypeNotSupportExceptionThrift(18, "Archive type not support"),
  AuthenticationFailedExceptionThrift(19, "Incorrect user name or password"),
  BadLicenseTokenExceptionThrift(20, "Invalid license token"),
  BootstrapDeniedExceptionThrift(21, ""),
  BuiltInMigrationRuleNotAllowedDeletedExceptionThrift(22,
      "Built-in migration rule not allowed to be deleted"),
  BuiltInMigrationRuleNotAllowedUpdatedExceptionThrift(23,
      "Built-in migration rule not allowed to be updated"),
  CRUDBuiltInRoleExceptionThrift(24, "The system role can not take any action"),
  CRUDSuperAdminAccountExceptionThrift(25,
      "It is forbidden to perform this operation on super administrators"),
  ChangeDiskLightStatusTimeoutExceptionThrift(26, "Changing th disk light status timed out"),
  ChangeDriverBoundVolumeFailedThrift(27, "Changing the driver bound volume is failed"),
  ChapSameUserPasswdErrorThrift(28, "CHAP user and password must be different"),
  ChecksumMismatchedExceptionThrift(29, "Checksum mismatched"),
  ClearAlarmException(30, "Clear Alarm failed"),
  ConfigurationNotFoundExceptionThrift(31, "Configuration not found"),
  ConnectionRefusedExceptionThrift(32, "Connect refused"),
  CoordinatorSyncExceptionThrift(33, "Driver sync failed"),
  CounterKeyExitedExceptionThrift(34, "Alarm performance item is already exist"),
  CreateRoleNameExistedExceptionThrift(35, "Role name already exists"),
  DatanodeIsUsingExceptionThrift(36, "Datanode is using"),
  DatanodeNotFoundExceptionThrift(37, "Datanode not found"),
  DatanodeNotFreeToUseExceptionThrift(38, "Datanode not free to use"),
  DatanodeTypeNotSetExceptionThrift(39, "Datanode type not set"),
  DeleteLoginAccountExceptionThrift(40, "The current user can not be deleted"),
  DeleteRoleExceptionThrift(41, "Delete role failed"),
  DestVolumeCanNotFoundExceptionThrift(42, "the destnation volume can't be found"),
  DestVolumeHasDriverWhenCopyExceptionThrift(43,
      "The destnation volume already has driver, please umount it first"),
  DestVolumeIsCopyingExceptionThrift(44, "The destination is copying"),
  DestVolumeNotAvailableExceptionThrift(45, "Destination volume not available"),
  DestVolumeSmallerThanOriVolumeExceptionThrift(46,
      "The destnation volume is smaller than origin volume"),
  DirNotEmptyExceptionThrift(47, "Directory not empty"),
  DiskHasBeenOfflineThrift(48, "Disk has been offline"),
  DiskHasBeenOnlineThrift(49, "Disk has been online"),
  DiskIsBusyThrift(50, "Disk is busy"),
  DiskNameIllegalExceptionThrift(51, "Disk name is illegal"),
  DiskNotBrokenThrift(52, "Disk is not broken"),
  DiskNotFoundExceptionThrift(53, "Disk does not exist"),
  DiskNotMismatchConfigThrift(54, "Disk's configuration matched"),
  DiskSizeCanNotSupportArchiveTypes_thrift(55, "Disk size can not support archive types"),
  DomainExistedExceptionThrift(56, "Domain exists"),
  DomainIsDeletingExceptionThrift(57, "Domain is deleting"),
  DomainNameExistedExceptionThrift(58, "Domain name exists"),
  DomainNotExistedExceptionThrift(59, "Domain doesn't exist"),
  DriverAmountAndHostNotFitThrift(60, "Driver Amount and host not fit"),
  DriverContainerIsINCExceptionThrift(61, "The service driverContainer is INC"),
  DriverFromRequestNotFoundExceptionThrift(62, "Driver not found"),
  DriverHostCannotUseThrift(63, "Driver host can not use"),
  DriverIsAliveExceptionThrift(64, "Driver is alive"),
  DriverIsLaunchingExceptionThrift(65, "Driver is launching, please try later"),
  DriverIsUpgradingExceptionThrift(66, "Driver is upgrading, please try later"),
  DriverLaunchFailedExceptionThrift(67,
      "Some problem occurred when launching driver, please try again"),
  DriverLaunchingExceptionThrift(68, "Driver is being launched"),
  DriverNameExistsExceptionThrift(69, "Driver name exists"),
  DriverNotFoundExceptionThrift(70, "Driver not found"),
  DriverTypeConflictExceptionThrift(71, "Driver type is conflict"),
  DriverTypeIsConflictExceptionThrift(72, "Driver type is conflict"),
  DriverUnmountingExceptionThrift(73, "Driver is being unmounted"),
  DriverUpgradeExceptionThrift(74, "Driver is upgrade"),
  DuplicateIpPortExceptionThrift(75, "Duplicate IP and port"),
  DynamicIOLimitationTimeInterleavingExceptionThrift(76,
      "Dynamic IO limitation time-interleaving"),
  EndPointNotFoundExceptionThrift(77, "Endpoint not available"),
  ExceedUserMaxCapacityExceptionThrift(78, "Exceed user max capacity"),
  ExistsClientExceptionThrift(79, "There are connected clients"),
  ExistsDriverExceptionThrift(80, "Driver already exists"),
  FailToRemoveArchiveFromStoragePoolExceptionThrift(81,
      "Fail to remove archive from storage pool"),
  FailToRemoveDatanodeFromDomainExceptionThrift(82, "Fail to remove datanode from domain"),
  FailedToActivateServiceExceptionThrift(83, "Try to active service failed"),
  FailedToApplyIscsiAccessRulesExceptionThrift(84, "Try to apply iscsi access rules failed"),
  FailedToApplyVolumeAccessRulesExceptionThrift(85, "Try to apply volume access rules failed"),
  FailedToCancelIscsiAccessRulesExceptionThrift(86, "Try to remove iscsi access rules failed"),
  FailedToCancelVolumeAccessRulesExceptionThrift(87, "Try to remove volume access rules failed"),
  FailedToChangeConfigurationExceptionThrift(88, "Try to change configuration failed"),
  FailedToDeactivateServiceExceptionThrift(89, "Try to deactivate service failed"),
  FailedToDestroyServiceExceptionThrift(90, "Try to destroy service failed"),
  FailedToExecuteCommandExceptionThrift(91, "Try to execute command failed"),
  FailedToPrepareWorkspaceThrift(92, "Try to prepare workspace failed"),
  FailedToRestartServiceExceptionThrift(93, "Try to restart service failed"),
  FailedToStartServiceExceptionThrift(94, "Try to start service failed"),
  FailedToTellDriverAboutAccessRulesExceptionThrift(95, "Failed to tell driver about access rule"),
  FailedToUmountDriverExceptionThrift(96, "Try to umount driver failed"),
  FailedToWipeoutExceptionThrift(97, "Try to wipeout service failed"),
  FileOpExceptionThrift(98, "File operation error"),
  FrequentFixVolumeRequestThrift(99, "Fix volume operation is too frequent"),
  IOExceptionThrift(102, "I/O error"),
  IOLimitationIsDeleting(103, "I/O limitation is being deleted"),
  IOLimitationTimeInterLeavingThrift(104, "IO limitation time interleaving"),
  IOLimitationsAlreadyAppliedError(105, "IO limitation already applied"),
  IOLimitationsDuplicateThrift(106, "IO limitation is duplicated"),
  IOLimitationsNotExists(107, "IO limitation not exists"),
  IllegalParameterExceptionThrift(108, "Parameter is illegal"),
  InstanceHasFailedAleadyExceptionThrift(109, "Instance has failed aleady"),
  InstanceIsSubHealthExceptionThrift(110, "Instance is sub-health"),
  InstanceNotExistsExceptionThrift(111, "Instance not exists"),
  InsufficientPrivilegeExceptionThrift(112, "Only account owner or admin can change password"),
  InvailidInputException(115, "Invalid input"),
  InvalidGroupExceptionThrift(116, "Invalid group"),
  InvalidInputExceptionThrift(117, "Invalid input"),
  InvalidLicenseFileExceptionThrift(118, "Invalid license file"),
  InvalidMembershipExceptionThrift(119, "Invalid membership"),
  InvalidParameterValueExceptionThrift(120, "Invalid parameter value"),
  IscsiAccessRuleDuplicateThrift(121, "ISCSI access rule already exists"),
  YouAreNotReadyExceptionThrift(122, ""),
  IscsiAccessRuleFormatErrorThrift(123, "ISCSI access rule format error"),
  IscsiAccessRuleNotFoundThrift(124, "ISCSI rule is not found"),
  IscsiAccessRuleUnderOperationThrift(125, "ISCSI access rule is being operated"),
  IscsiBeingDeletedExceptionThrift(126, "ISCSI is deleted"),
  IscsiNotFoundExceptionThrift(127, "ISCSI not found"),
  IscsiUnderOperationExceptionThrift(128, "ISCSI not operation"),
  LackDatanodeExceptionThrift(129, "Insufficient datanode"),
  LaunchedVolumeCannotBeDeletedExceptionThrift(130, "Please unmount driver first"),
  LaunchedVolumeCannotRollbackExceptionThrift(131, "Please unmount driver first"),
  LeaseExpiredExceptionThrift(132, "lease expired"),
  LicenseExceptionThrift(133, "License exception"),
  LicenseExistedExceptionThrift(134, "License already exists"),
  LimitationAlreadyExistExceptionThrift(135, "Limitation already exists"),
  LimitationNotExistExceptionThrift(136, "Limitation not exists"),
  LoadVolumeExceptionThrift(137, "Load volume failed"),
  LogIdTooSmallExceptionThrift(138, "Log id is too small"),
  MemberShipChangedExceptionThrift(139, "Membership was changed"),
  MigrationRuleAlreadyAppliedError(140, "Migration speed rule already applied"),
  MigrationRuleDuplicateThrift(141, "Migration speed rule is duplicated"),
  MigrationRuleIsDeleting(142, "Migration speed rule is being deleted"),
  MigrationRuleNotExists(143, "Migration speed rule not exists"),
  ModificationTooLateExistExceptionThrift(144, ""),
  MoveOnlineTheVolumeHasInitExceptionThrift(145, ""),
  NetCardCannotRecoveryYetExceptionThrift(146, "Net card cannot recovery yet"),
  NetCardChangeFailedExceptionThrift(147, "Net card switch error"),
  NetCardOftenChangeExceptionThrift(148, "Net card often switch error"),
  NetCardStartFailedExceptionThrift(149, "Net card start failed"),
  NoAlarmTemplateExistedException(151, "There is no alarm template"),
  NoDriverLaunchExceptionThrift(152, "There is no driver launched"),
  NoLicenseExceptionThrift(153, "There is no license"),
  NoMemberExceptionThrift(154, "There is no member"),
  NoNeedToRebalanceThrift(155, "No need to do rebalance now"),
  NoSuchPageInSessionExceptionThrift(156, "No such page in session"),
  NoSuchSessionExceptionThrift(157, "No such session"),
  NoTaskExistedException(158, "There is no task"),
  NotDIHExceptionThrift(159, "DIH service not found"),
  NotEnoughGroupExceptionThrift(160, "There is no enough group"),
  NotEnoughLicenseTokenExceptionThrift(161, "There is no enough license token"),
  NotEnoughNormalGroupExceptionThrift(162, "There is no enough normal group"),
  NotEnoughSpaceExceptionThrift(163, "There is no enough space"),
  NotPrimaryExceptionThrift(164, "Not primary"),
  NotReadyForServingThrift(165, "Service not volume"),
  NotRootVolumeExceptionThrift(166, "Volume is not root volume"),
  NotSecondaryExceptionThrift(167, "Segment unit is not secondary"),
  OlderPasswordIncorrectExceptionThrift(168, "Old password is incorrect"),
  OperationNotFoundExceptionThrift(169, "Operation not found"),
  OriVolumeCanNotFoundExceptionThrift(170, "The origin volume can't be found"),
  OriVolumeHasDriverWhenCopyExceptionThrift(171,
      "The original volume already has driver, please umount it first"),
  OriVolumeNotAvailableExceptionThrift(172, "Origin volume not available"),
  PageUsedExceptionThrift(173, "Page is used"),
  ParametersIsErrorExceptionThrift(174, "Invalid argument"),
  ParentPathNotDirExceptionThrift(175, "The parent file path you specified is not directory"),
  PathExistExceptionThrift(176, "The file path you specified is exist"),
  PathNotDirExceptionThrift(177, "The file path you specified is not directory"),
  PathNotExistExceptionThrift(178, "The file path you specified not exists"),
  PathNotFileExceptionThrift(179, "The file path you specified is not file"),
  PerFormanceTaskStopException(180, "Stop performance task failed"),
  PerformanceCreationException(181, "Create performance task failed"),
  PerformanceDataTimeCrossBorderExceptionThrift(182, "Performance date time cross border"),
  PerformanceDataTimeSpanIsBigExceptionThrift(183, "Performance data time span is too big"),
  PerformanceStoreException(184, "Get performance data error"),
  PerformanceTaskExistedException(185, "Performance Task is Existed"),
  PerformanceTaskIsRudundantExceptionThrift(186, "Performance task is redundant"),
  PerformanceTaskStartingException(187, "Start performance task failed"),
  PerformanceTestExceptionThrift(188, "Test performance failed"),
  PermissionNotGrantExceptionThrift(189, "Insufficient current user permissions"),
  PoolAlreadyAppliedRebalanceRuleExceptionThrift(190, "Pool already applied rebalance rule"),
  PrimaryCandidateCantBePrimaryExceptionThrift(191, "Primary candidate can not be primary"),
  PrimaryExistsExceptionThrift(192, "Primary is exists"),
  ReadPerformanceParameterFromFileExceptionThrift(193, "Read parameter of performance from filed"),
  RebalanceRuleExistingExceptionThrift(194, "Rebalance rule is existing"),
  RebalanceRuleNotExistExceptionThrift(195, "Rebalance rule not exists"),
  ReceiverStaleMembershipExceptionThrift(196, "Receiver tale membership"),
  ResourceExhaustedExceptionThrift(197, "Resource exhausted"),
  ResourceNotExistsExceptionThrift(198, "The resource does not exist"),
  RoleIsAssignedToAccountsExceptionThrift(199,
      "The role has been given to the user, please remove the role in the user first"),
  RoleNotExistedExceptionThrift(200, "Role does not exist"),
  RootIscsiBeingDeletedExceptionThrift(201, "Root iscsi deleting"),
  RootVolumeBeingDeletedExceptionThrift(202, "Root volume is being deleted"),
  RootVolumeNotFoundExceptionThrift(203, "Root volume not found"),
  SegmentExistingExceptionThrift(204, "Segment is existing"),
  SegmentNotFoundExceptionThrift(205, "Segment not found"),
  SegmentOfflinedExceptionThrift(206, "Segment is offline"),
  SegmentUnitBeingDeletedExceptionThrift(207, "Segment unit is deleting "),
  SegmentUnitCloningExceptionThrift(208, "Segment unit is cloning "),
  ServerNodeIsUnknownThrift(209, "Server node is unknown"),
  ServerNodeNotExistExceptionThrift(210, "Server node not exist"),
  ServerNodePositionIsRepeatExceptionThrift(211, "Server node position is existed"),
  ServiceHavingBeenShutdownThrift(212, "Service has been shutdown"),
  ServiceIsBusyExceptionThrift(213, "Service is busy"),
  ServiceIsNotAvailableThrift(214, "Service is not available"),
  ServiceNotFoundExceptionThrift(215, "Service not found"),
  ServiceNotRunnableExceptionThrift(216, "Service is not runnable"),
  ServiceStatusIsErrorExceptionThrift(217, "Service status is not ok"),
  SessionDeniedExceptionThrift(218, "Session is denied"),
  SmtpSendEmailExceptionThrift(219, "Send email by smtp failed"),
  SnapshotBeMountedExceptionThrift(220,
      "Snapshot that has been mounted is not allow to delete,"
          + " snapshots before this one isnt allow to rollback"),
  SnapshotCountReachMaxExceptionThrift(221, "The number of snapshots exceeds the upper limit"),
  SnapshotCreatingExceptionThrift(222, "Snapshot is being created"),
  SnapshotDeletingExceptionThrift(223, "Snapshot is being deleted"),
  SnapshotDescriptionTooLongExceptionThrift(224, "The description size of snapshot is too long"),
  SnapshotExistExceptionThrift(225, "Snapshot is existing"),
  SnapshotIsInCloningExceptionThrift(226, "Snapshot is cloning"),
  SnapshotNameExistExceptionThrift(227, "Snapshot name is existing"),
  SnapshotNameTooLongExceptionThrift(228, "The name size of snapshot is too long"),
  SnapshotNotFoundExceptionThrift(229, "Snapshot not found"),
  SnapshotRollingBackExceptionThrift(230, "Snapshot is being rollback"),
  SnapshotVersionMismatchExceptionThrift(231, "Snapshot version is mismatch"),
  SpaceNotAvailableExceptionThrift(232, ""),
  SrcVolumeDoesNotHaveExactOneDriverExceptionThrift(233,
      "Source volume does not have exact one driver"),
  SrcVolumeHaveDriverExceptionThrift(234,
      "The source volume already has driver, please umount it first"),
  StaleMembershipExceptionThrift(235, ""),
  StillHaveStoragePoolExceptionThrift(236, "Domain still have storage pool"),
  StillHaveVolumeExceptionThrift(237, "Storage pool still has volume"),
  StorageEmptyExceptionThrift(238, "Storage pool is empty"),
  StoragePoolExistedExceptionThrift(239, "Storage pool already exist"),
  StoragePoolIsDeletingExceptionThrift(240, "Storage pool is being deleting"),
  StoragePoolNameExistedExceptionThrift(241, "The name of storage pool is already exists"),
  StoragePoolNotExistInDoaminExceptionThrift(242, "Storage pool not found in domain"),
  StoragePoolNotExistedExceptionThrift(243, "Storage pool not found from DB"),
  SystemCpuIsNotEnoughThrift(244, "The ability of system cpu is not enough"),
  SystemMemoryIsNotEnoughThrift(245, "The memory size is not enough"),
  TAlreadyExistedException(246, ""),
  TEmptyStoreException(247, ""),
  TNotExistedException(248, ""),
  TestInternalErrorThrift(249, ""),
  TimeoutExceptionThrift(250, "timeout"),
  TooManyDriversExceptionThrift(251, "Has too many drivers"),
  TooManyEndPointFoundExceptionThrift(252, "There is more than one active service"),
  TransportExceptionThrift(253, "Network anomaly, maybe the operation is failed"),
  USMPassphrasesLengthException(254, "USM password is too short"),
  UnknownIPV4HostExceptionThrift(255, "Unknown IPv4 host"),
  UnknownIPV6HostExceptionThrift(256, "Unknown IPv6 host"),
  UnsupportedEncodingExceptionThrift(257, "Can not supported encoding"),
  UselessLicenseExceptionThrift(258, "The license that has been installed is useless"),
  VolumeAccessRuleDuplicateThrift(259, "This access rule is duplicated"),
  VolumeBeingCreatedExceptionThrift(260, "The volume is being created"),
  VolumeBeingDeletedExceptionThrift(261, "The volume is being deleted"),
  VolumeCannotBeRecycledExceptionThrift(262, "Volume cannot be restored"),
  VolumeCyclingExceptionThrift(263, "Volume is cycling"),
  VolumeDeletingExceptionThrift(264, "Volume is deleting"),
  VolumeExistingExceptionThrift(265, "Volume is already exist"),
  VolumeFixingOperationExceptionThrift(266, "This volume is fixing, please not do it again"),
  VolumeHasNotBeenLaunchedExceptionThrift(267, "Volume has no drivers"),
  VolumeInExtendingExceptionThrift(268, "Volume is extending"),
  VolumeInMoveOnlineDoNotHaveOperationExceptionThrift(269,
      "Volume is moving online, Please prohibit other operations"),
  VolumeIsAppliedWriteAccessRuleExceptionThrift(270, "Volume is already applied write access rule"),
  VolumeIsBeginMovedExceptionThrift(271, "Volume is being moved"),
  VolumeIsCloningExceptionThrift(272, "Volume is cloning"),
  VolumeIsConnectedByWritePermissionClientExceptionThrift(273,
      "Volume is connected by write permission"),
  VolumeIsCopingExceptionThrift(274, "Volume is being copy"),
  VolumeIsMarkWriteExceptionThrift(275, "Volume is marked Write"),
  VolumeIsMovingExceptionThrift(276, "Volume is moving"),
  VolumeLaunchMultiDriversExceptionThrift(277, "Volume not allowed launch more than one driver"),
  VolumeMarkReadWriteExceptionThrift(278, "Volume is marked ReadWrite"),
  VolumeNameExistedExceptionThrift(279, "Volume name is already exists"),
  VolumeNotAvailableExceptionThrift(280, "Volume is not available"),
  VolumeNotFoundExceptionThrift(281, "Volume is not found"),
  VolumeSizeIllegalExceptionThrift(282, "Volume size is illegal"),
  VolumeSizeNotMultipleOfSegmentSizeThrift(283,
      "Volume size is not integral multiple of segment size"),
  VolumeUnderOperationExceptionThrift(284, "Volume is being operated"),
  VolumeWasCloneingExceptionThrift(285, "Volume is cloning"),
  VolumeWasLaunchingExceptionThrift(286, "Volume is being launch"),
  VolumeWasRollbackingExceptionThrift(287, "Volume is being rollback"),
  YouAreNotInMembershipExceptionThrift(288, "Segment unit not in membership"),
  YouAreNotInRightPositionExceptionThrift(289, "Segment unit not in right position"),
  User_SessionOut(292, "user logout"),
  UnsupportedCacheTypeExceptionThrift(295, "Cache type not support"),
  UnsupportedWTSTypeExceptionThrift(296, "WTS type not support"),
  CounterKeyIllegalExceptionThrift(297, "Counter key is illegal"),
  AccountIsLockedExceptionThrift(298, "Account is locked"),
  VolumeCanNotLaunchMultiDriversThisTimeExceptionThrift(299,
      "Volume not allowed launch more than one driver this time"),
  VolumeOriginalSizeNotMatchExceptionThrift(300, "The original size of volume isn't matched"),
  VolumeNameIsIllegalExceptionThrift(301,
      "Volume name must be more than two digits without special symbols"),
  QosIopsExceptionThrift(302, "Qos iop upper or lower size illegal"),
  QosThroughputExceptionThrift(303, "Qos throughput upper or lower size illegal"),
  DriverStillReportExceptionThrift(304, "driver still report when remove this driver info"),

  InvalidVersionException(293, "Restful version invalid"),

  GenericExceptionThrift(100, "Network Error"),
  IFaceNotFoundExceptionThrift(101, "Network Error"),
  NetworkErrorExceptionThrift(150, "Network error"),
  TException(290, "Network error"),

  InternalErrorThrift(113, "Internal error"),
  InternalException(114, "Internal error"),
  TApplicationException(294, "Internal error"),
  Exception(291, "Internal error");

  private int errorCode;
  private String description;


  Errors(int errorCode, String description) {
    this.errorCode = errorCode;
    this.description = description;
  }

  public int getErrorCode() {
    return errorCode;
  }

  public String getDescription() {
    return description;
  }

  /**
   * get Errors by code.
   *
   * @param errorCode error code
   * @return error
   */
  public static Errors getErrorsByCode(int errorCode) {
    for (Errors error : values()) {
      if (error.getErrorCode() == errorCode) {
        return error;
      }
    }
    return null;
  }
}
